package com.tp.bean;

import org.coody.framework.core.annotation.Around;
import org.coody.framework.core.annotation.Arounds;
import org.coody.framework.core.annotation.AutoBuild;
import org.coody.framework.core.entity.AspectPoint;

/**
 * @author liutp
 * @date 2019/5/21 15:11
 * @description MyAspect:
 */
@AutoBuild
public class MyAspect {
//
    @Around(annotationClass = AspectMethod.class)
    public void aspect(AspectPoint aspectPoint) throws Throwable {
        try {
            System.out.println("--------------------->befor");
            aspectPoint.invoke();
        } finally {
            System.out.println("--------------------->after");
        }

    }

//    @Around(annotationClass = {AspectMethod.class})
//    public void aspert_1(AspectPoint aspectPoint) throws Throwable {
//        try {
//            System.out.println("--------------------->befor_1");
//            aspectPoint.invoke();
//        } finally {
//            System.out.println("--------------------->after_1");
//        }
//    }
}
